#include <stdio.h>

typedef struct {
    char name[50];
    int age;
    double height;
    double weight;
    double bmi;
} Person;

void inputPersonData(Person *persons, int n) {
    for (int i = 0; i < n; i++) {
        scanf("%s%d%lf%lf", persons[i].name, &persons[i].age, &persons[i].height, &persons[i].weight);
    }
}
void calculateBMI(Person *persons, int n) {
    for (int i = 0; i < n; i++) {
        persons[i].bmi = persons[i].weight / persons[i].height / persons[i].height;
    }
}
void outputPersonData(Person *persons, int n) {
    for (int i=0;i<n;i++) {
        printf("姓名：%s\nBMI：%.2lf\n%s",persons[i].name,persons[i].bmi,((persons[i].bmi>=24.00)? "健康建议：超重，建议减少体重。":"健康建议：正常，保持当前生活方式。"));
    }
}
